package com.wshl.understand.testapplication;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        Intent intent = getIntent();
        if (intent != null) {

            Uri uri = intent.getData();
            if (uri != null) {
                String value = uri.getQueryParameter("canshu");
                Toast.makeText(this, value, Toast.LENGTH_LONG).show();
            }
            String data = intent.getDataString();
            if (data != null) {
                // Toast.makeText(this, data, Toast.LENGTH_LONG).show();
            }
        }
    }
}
